<?php
class Template extends MtHamlAdapter{

    static public function set($name) {
        Yaf_Registry::get('tpl')->template($name);
    }

    //like set
    public static function push ( $path=null, $name ){
        Yaf_Registry::get('tpl')->template();
    }

    public static function make($condition, $value,$str){
        if(intval($condition) == intval($value)){
            return $str;
        }else{
            return false;
        }
                
    }
    public static function url($str,$key=null,$value){
        if(is_string($value)){
            return $str.'?'.$value;
        }

        if(is_array($value)){
            $temp = null;
            foreach($value as $key){
                $temp .= $key.'='.$value;
            }
            return $str.'?'.$temp;
        }
    }
}
